﻿--HEADER Create Action table

CREATE TABLE [UDS].[Action](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[FundBookEntityId] [int] NOT NULL,
	[IdeaId] [uniqueidentifier] NOT NULL,
	[CreatorCode] [tinyint] NOT NULL,
	[ActionDateTime] [datetime2](7) NOT NULL,
	[Type] [tinyint] NOT NULL,
	CONSTRAINT [PK_Action] PRIMARY KEY CLUSTERED ([Id] ASC)
 )

 GO

CREATE NONCLUSTERED INDEX [IX_FundBookEntityId] ON [UDS].[Action]
(
	[FundBookEntityId] ASC	
)

GO

CREATE TABLE [UDS].[ActionDetails](
	[Id] [int] NOT NULL,
	[ActionData] [nvarchar](max) NULL
)

GO

CREATE UNIQUE NONCLUSTERED INDEX [IX_ActionDetails] ON [UDS].[ActionDetails]
(
	[Id] ASC
)


